<?php

class m120215_060054_user_login_log extends CDbMigration {
	public function safeUp() {
		$this
			->createTable('erp_user_login_log',
				array(
					'id' => 'pk',
					'userId' => 'int',
					'ip' => 'string',
					'loginTime' => 'datetime',
					'fromCookie' => 'boolean'
				), 'ENGINE = ARCHIVE');
	}

	public function safeDown() {
		$this->dropTable('erp_user_login_log');
	}
}
